<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateErrorPathsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('error_paths', function (Blueprint $table) {
            $table->increments('id');
            $table->string('domain')->nullable()->comment('域名');
            $table->string('path')->nullable()->comment('图片地址');
            $table->text('ua')->nullable()->comment('设备信息');
            $table->string('ip')->nullable()->comment('出错用户IP');
            $table->tinyInteger('type')->nullable()->default(1)->comment('类型1 图片，2视频');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('error_paths');
    }
}
